
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>1.1 正则表达式入门 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Python中的正则表达式.html" />
    
    
    <link rel="prev" href="正则表达式.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="正则表达式.html">
            
                <a href="正则表达式.html">
            
                    
                    第一章：正则表达式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.2.1" data-path="正则表达式入门.html">
            
                <a href="正则表达式入门.html">
            
                    
                    1.1 正则表达式入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="Python中的正则表达式.html">
            
                <a href="Python中的正则表达式.html">
            
                    
                    1.2 Python中的正则表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="基本正则表达式.html">
            
                <a href="基本正则表达式.html">
            
                    
                    1.3 基本正则表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="分组.html">
            
                <a href="分组.html">
            
                    
                    1.4 分组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="先行断言.html">
            
                <a href="先行断言.html">
            
                    
                    1.5 先行断言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="标记.html">
            
                <a href="标记.html">
            
                    
                    1.6 标记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="替换与正则表达式编译.html">
            
                <a href="替换与正则表达式编译.html">
            
                    
                    1.7 替换与正则编译
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="正则表达式练习.html">
            
                <a href="正则表达式练习.html">
            
                    
                    1.8 正则表达式练习
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Python爬虫学习目标.html">
            
                <a href="Python爬虫学习目标.html">
            
                    
                    第二章：爬虫与Requests
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="Requests的简单使用.html">
            
                <a href="Requests的简单使用.html">
            
                    
                    2.1 Requests的简单使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="深入了解Requests.html">
            
                <a href="深入了解Requests.html">
            
                    
                    2.2 深入了解Requets
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="结构化与非结构化.html">
            
                <a href="结构化与非结构化.html">
            
                    
                    第三章：非结构化与结构化数据提取
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="正则抓取.html">
            
                <a href="正则抓取.html">
            
                    
                    3.1 使用正则的爬虫
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="xpath与XML.html">
            
                <a href="xpath与XML.html">
            
                    
                    3.2 Xpath与XML类库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="lxml.html">
            
                <a href="lxml.html">
            
                    
                    3.3 LXML库的使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="Xpath爬虫案例.html">
            
                <a href="Xpath爬虫案例.html">
            
                    
                    3.4 案例：贴吧图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="Json与JsonPath.html">
            
                <a href="Json与JsonPath.html">
            
                    
                    3.5 Json与Json数据获取
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="实例：糗事百科网站抓取.html">
            
                <a href="实例：糗事百科网站抓取.html">
            
                    
                    3.6 糗事百科网站爬虫
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >1.1 正则表达式入门</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5165;&#x95E8;">&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5165;&#x95E8;</h2>
<p>&#x5728;Python&#x4E2D;&#x4F7F;&#x7528;&#x6B63;&#x5219;&#x9700;&#x8981;&#x5BFC;&#x5165;<code>re</code>&#x5305;</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> re
</code></pre>
<p>&#x9996;&#x5148;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x4E24;&#x4E2A;&#x4F8B;&#x5B50;&#x6765;&#x4F53;&#x9A8C;&#x4E00;&#x4E0B;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x5A01;&#x529B;&#x5427;&#xFF1A;</p>
<p>&#x73B0;&#x5728;&#x6709;&#x8FD9;&#x6837;&#x4E00;&#x6BB5;&#x5B57;&#x7B26;&#x4E32;
<code>&lt;table&gt;&lt;tr&gt;hello world 18111234589&lt;tr&gt;&lt;tr&gt;&lt;span&gt;name:&#x5F20;&#x4E09;,tel:18711001111&lt;/span&gt;&lt;/tr&gt;&lt;/table&gt;</code>
&#x9700;&#x8981;&#x4F60;&#x505A;&#x4E24;&#x4EF6;&#x4E8B;&#xFF1A;</p>
<ol>
<li>&#x63D0;&#x53D6;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;<code>&lt;span&gt;</code>&#x6807;&#x7B7E;&#x91CC;&#x7684;&#x5185;&#x5BB9;&#xFF1B;</li>
<li>&#x63D0;&#x53D6;&#x5176;&#x4E2D;&#x6240;&#x6709;&#x7684;&#x624B;&#x673A;&#x53F7;&#xFF1B;</li>
</ol>
<p>&#x5982;&#x679C;&#x4E0D;&#x7528;&#x6B63;&#x5219;&#x6211;&#x4EEC;&#x6765;&#x5B8C;&#x6210;&#x8FD9;&#x4E24;&#x4E2A;&#x8981;&#x6C42;&#xFF1A;</p>
<pre><code>s = &apos;&lt;table&gt;&lt;tr&gt;hello world 18111234589&lt;tr&gt;&lt;tr&gt;&lt;span&gt;name:&#x5F20;&#x4E09;,tel:18711001111&lt;/span&gt;&lt;/tr&gt;&lt;/table&gt;&apos;
#&#x7B2C;&#x4E00;&#x9898;
start = s.find(&apos;&lt;span&gt;&apos;)
end = s.rfind(&apos;&lt;/span&apos;)

if start != -1:
    print(s[start+len(&apos;&lt;span&gt;&apos;):end])
</code></pre><p>&#x4E0A;&#x8FF0;&#x4EE3;&#x7801;&#x4F1A;&#x8F93;&#x51FA;&#xFF1A;<code>name:&#x5F20;&#x4E09;,tel:18711001111</code></p>
<p>&#x7B2C;&#x4E00;&#x9898;&#x5F88;&#x7B80;&#x5355;&#x561B;&#xFF0C;&#x597D;&#x4E86;&#xFF0C;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x7B2C;&#x4E8C;&#x9898;&#xFF1A;&#x63D0;&#x53D6;&#x624B;&#x673A;&#x53F7;&#xFF0C;&#x9996;&#x5148;&#x8981;&#x4E86;&#x89E3;&#x624B;&#x673A;&#x53F7;&#x7684;&#x89C4;&#x5219;&#xFF1A;</p>
<ul>
<li>&#x5FC5;&#x987B;&#x662F;11&#x4F4D;&#x7684;&#x6570;&#x5B57;&#xFF1B;</li>
<li>&#x7B2C;&#x4E00;&#x4F4D;&#x6570;&#x5B57;&#x4EE5;1&#x5F00;&#x5934;&#xFF0C;&#x7B2C;&#x4E8C;&#x4F4D;&#x6570;&#x5B57;&#x53EF;&#x4EE5;&#x662F;[3,4,5,7,8]&#x4E2D;&#x7684;&#x4EFB;&#x610F;&#x4E00;&#x4E2A;&#xFF0C;&#x540E;&#x9762;9&#x4E2A;&#x662F;[0-9]&#x4E2D;&#x7684;&#x4EFB;&#x610F;&#x4E00;&#x4E2A;&#x6570;&#x5B57;&#xFF08;&#x73B0;&#x5728;&#x89C4;&#x5219;&#x66F4;&#x591A;&#x4E86;&#xFF0C;&#x51FA;&#x73B0;&#x4E86;19**&#x7684;&#x53F7;&#x7801;&#xFF0C;&#x8FD9;&#x91CC;&#x4F5C;&#x4E3A;&#x4F8B;&#x5B50;&#x5C31;&#x7B80;&#x5355;&#x4E00;&#x70B9;&#xFF09;&#xFF1B;</li>
</ul>
<p>&#x73B0;&#x5728;&#x7528;Python&#x4EE3;&#x7801;&#x6765;&#x5B9E;&#x73B0;&#x624B;&#x673A;&#x53F7;&#x7684;&#x63D0;&#x53D6;&#xFF0C;&#x770B;&#x5230;&#x8FD9;&#x4E2A;&#x5B57;&#x7B26;&#x4E32;&#x548C;&#x89C4;&#x5219;&#xFF0C;&#x5FC3;&#x91CC;&#x60F3;&#xFF0C;&#x7EB3;&#x5C3C;&#xFF1F;&#xFF1F;&#x8FD9;&#x8981;&#x6211;&#x5199;&#x591A;&#x5C11;&#x4E2A;&#x5224;&#x65AD;&#xFF1F;&#x6211;&#x9009;&#x62E9;&#x653E;&#x5F03;&#x3002;</p>
<p><img src="https://upload-images.jianshu.io/upload_images/7013389-fc1528bb6de5b7e8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="image.png"></p>
<p>&#x4E0D;&#x8FC7;&#x6D3B;&#x8FD8;&#x662F;&#x5F97;&#x5E72;&#xFF0C;&#x53EA;&#x7528;Python&#x7684;&#x5224;&#x65AD;&#x548C;&#x5FAA;&#x73AF;&#x6211;&#x80AF;&#x5B9A;&#x4E0D;&#x60F3;&#x5E72;&#x8FD9;&#x4E2A;&#x82E6;&#x5DEE;&#x4E8B;&#xFF0C;&#x7528;&#x6B63;&#x5219;&#x4F1A;&#x600E;&#x4E48;&#x6837;&#x5462;&#xFF1F;</p>
<pre><code>import re

s = &apos;&lt;table&gt;&lt;tr&gt;hello world 18111234589&lt;tr&gt;&lt;tr&gt;&lt;span&gt;name:&#x5F20;&#x4E09;,tel:18711001111&lt;/span&gt;&lt;/tr&gt;&lt;/table&gt;&apos;

 #&#x7B2C;&#x4E00;&#x9898; &#x83B7;&#x53D6;&lt;span&gt;&#x6807;&#x7B7E;&#x5185;&#x7684;&#x6240;&#x6709;&#x6570;&#x636E;
info = re.search(r&apos;(?&lt;=&lt;span&gt;).*(?=&lt;/span&gt;)&apos;,s)
print(info.group(0))

#&#x7B2C;&#x4E8C;&#x9898;  &#x63D0;&#x53D6;&#x6240;&#x6709;&#x624B;&#x673A;&#x53F7;&#x7801;
phone = re.findall(r&apos;1[34578]\d{9}&apos;,s,re.S)
print(phone)
</code></pre><p>&#x8F93;&#x51FA;&#x7684;&#x7ED3;&#x679C;&#x4E3A;&#xFF1A;</p>
<p><code>name:&#x5F20;&#x4E09;,tel:18711001111</code>
<code>[&apos;18111234589&apos;, &apos;18711001111&apos;]</code></p>
<p>&#x548C;&#x67E5;&#x627E;&#x5B57;&#x7B26;&#x4E32;&#x5E76;&#x5224;&#x65AD;&#x53BB;&#x627E;&#x5230;&#x76EE;&#x6807;&#x5B57;&#x7B26;&#x4E32;&#x76F8;&#x6BD4;&#xFF0C;&#x6B63;&#x5219;&#x5C31;&#x50CF;&#x662F;&#x5F00;&#x4E86;&#x6302;&#xFF0C;&#x54E6;&#x4E0D;&#x5BF9;&#xFF0C;&#x5F00;&#x6302;&#x5B9E;&#x9524;&#xFF01;</p>
<p>&#x5728;&#x6765;&#x770B;&#x4E2A;&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code>    &#x5F20;&#x4F1F; 86-14870293148  \n
   &#x738B;&#x4F1F;   +86-13285654569    \n
    &#x738B;&#x82B3;        15856529115    \n
 &#x674E;&#x4F1F;         13022816340  \n
  &#x738B;&#x79C0;&#x82F1;   (86)14785720656     \n
   &#x674E;&#x79C0;&#x82F1;    17201444672    \n
    &#x674E;&#x5A1C;         15682812452     \n
    &#x5F20;&#x79C0;&#x82F1;         14326967740     \n
    &#x5218;&#x4F1F;  15146435743    \n
   &#x5F20;&#x654F;        (86)-17712576838   \n
    &#x674E;&#x9759;       86 14295083635  \n
    &#x5F20;&#x4E3D;     (+86) 13722348123   \n
   &#x738B;&#x9759;         17587918887   \n
  &#x738B;&#x4E3D;    15493106739    \n
 &#x674E;&#x5F3A;      13786842977   \n
 &#x5F20;&#x9759;         86-15542304386     \n
    &#x674E;&#x654F;         15642387356 \n
   &#x738B;&#x654F;          18627216756  \n
 &#x738B;&#x78CA;       17206185726   \n
    &#x674E;&#x519B;      17857426238     \n
   &#x5218;&#x6D0B;        17345352790     \n
</code></pre><p>&#x5BF9;&#x4E8E;&#x8FD9;&#x6837;&#x4E00;&#x6BB5;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x73B0;&#x5728;&#x8BA9;&#x4F60;&#x505A;&#x5982;&#x4E0B;&#x5904;&#x7406;&#xFF1A;</p>
<p>1.&#x63D0;&#x53D6;&#x6240;&#x6709; 11 &#x4F4D;&#x6570;&#x5B57;&#x7535;&#x8BDD;&#x53F7;&#x7801;</p>
<p>2.&#x63D0;&#x53D6;&#x6240;&#x6709; 18 &#x6216; 13 &#x5F00;&#x5934;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;</p>
<p>3.&#x63D0;&#x53D6;&#x6240;&#x6709;&#x201C;&#x738B;&#x201D;&#x59D3;&#x540C;&#x5B66;&#x7684;&#x540D;&#x5B57;</p>
<p>4.&#x63D0;&#x53D6;&#x6240;&#x6709;&#x201C;&#x5F20;&#x201D;&#x59D3;&#x540C;&#x5B66;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;</p>
<p>5.&#x91CD;&#x65B0;&#x6392;&#x7248;&#xFF0C;&#x6392;&#x7248;&#x6210;&#x7EDF;&#x4E00;&#x7684;&#x683C;&#x5F0F;&#xFF0C;&#x53BB;&#x6389;&#x56FD;&#x5BB6;&#x533A;&#x53F7;&#x3002;</p>
<p>&#x600E;&#x4E48;&#x505A;&#x5462;&#xFF1F; &#x7528;&#x5E38;&#x89C4;&#x7684;&#x65B9;&#x6CD5;&#x663E;&#x7136;&#x7279;&#x522B;&#x590D;&#x6742;&#xFF0C;&#x800C;&#x7528;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x5C31;&#x8981;&#x65B9;&#x4FBF;&#x5F88;&#x591A;&#xFF0C;&#x4E3A;&#x6B64;&#x54B1;&#x4EEC;&#x5C31;&#x9700;&#x8981;&#x7CFB;&#x7EDF;&#x7684;&#x5B66;&#x4E60;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x4E86;&#x3002;</p>
<p>&#x8981;&#x719F;&#x7EC3;&#x7684;&#x4F7F;&#x7528;&#x6B63;&#x5219;&#xFF0C;&#x54B1;&#x4EEC;&#x5FC5;&#x987B;&#x4ECE;&#x57FA;&#x7840;&#x7684;&#x5F00;&#x59CB;&#xFF0C;&#x5C31;&#x50CF;&#x4EE5;&#x524D;&#x80CC;&#x8BF5;99&#x4E58;&#x6CD5;&#x8868;&#x4E00;&#x6837;&#xFF0C;&#x5F53;&#x4F60;&#x4F7F;&#x7528;&#x6B63;&#x5219;&#x50CF;&#xFF0C;&#x4E00;&#x4E00;&#x5F97;&#x4E00;&#xFF0C;&#x4E00;&#x4E8C;&#x5F97;&#x4E8C;&#x4E00;&#x6837;&#x6E38;&#x5203;&#x6709;&#x4F59;&#x4E86;&#xFF0C;&#x5C31;&#x5DEE;&#x4E0D;&#x591A;&#x4E86;&#x3002;</p>
<h2 id="python&#x6B63;&#x5F0F;&#x8868;&#x8FBE;&#x5F0F;&#x57FA;&#x7840;">Python&#x6B63;&#x5F0F;&#x8868;&#x8FBE;&#x5F0F;&#x57FA;&#x7840;</h2>
<p>&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x662F;&#x4E00;&#x4E2A;&#x4EE5;&#x7B80;&#x5355;&#x76F4;&#x89C2;&#x7684;&#x65B9;&#x5F0F;&#x901A;&#x8FC7;&#x5BFB;&#x627E;&#x6A21;&#x5F0F;&#x5339;&#x914D;&#x6587;&#x672C;&#x7684;&#x5DE5;&#x5177;&#xFF1B;</p>
<p>&#x4F7F;&#x7528;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x6709;&#x4E24;&#x4E2A;&#x5E38;&#x89C1;&#x7684;&#x539F;&#x56E0;&#x3002;</p>
<ol>
<li>&#x7B2C;&#x4E00;&#x4E2A;&#x539F;&#x56E0;&#x662F;&#x6570;&#x636E;&#x6316;&#x6398;&#x2014;&#x2014;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x5F53;&#x6211;&#x4EEC;&#x5E0C;&#x671B;&#x5728;&#x4E00;&#x5927;&#x5806;&#x6587;&#x672C;&#x4E2D;&#x627E;&#x5230;&#x4E00;&#x5C0F;&#x5806;&#x6587;&#x672C;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;&#x8EAB;&#x4EFD;&#x8BC1;&#xFF0C;&#x624B;&#x673A;&#x53F7;&#xFF0C;e-mail&#x7B49;&#xFF1B;</li>
<li>&#x7B2C;&#x4E8C;&#x4E2A;&#x539F;&#x56E0;&#x662F;&#x9A8C;&#x8BC1;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x786E;&#x8BA4;&#x83B7;&#x5F97;&#x7684;&#x6570;&#x636E;&#x662F;&#x4F60;&#x6240;&#x671F;&#x671B;&#x7684;&#xFF0C;&#x5982;&#x7528;&#x6237;&#x9A8C;&#x8BC1;&#xFF0C;&#x5BC6;&#x7801;&#x957F;&#x5EA6;&#x548C;&#x683C;&#x5F0F;&#x7684;&#x9A8C;&#x8BC1;&#xFF1B;</li>
</ol>
<p>Python &#x7684; <code>re</code> &#x6A21;&#x5757;&#xFF0C;&#x4F7F;&#x5F97;Python&#x5177;&#x5907;&#x4E86;&#x4F7F;&#x7528;&#x5168;&#x90E8;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x529F;&#x80FD;</p>
<p><code>re</code>&#x6A21;&#x5757;&#x5177;&#x6709;&#x5F88;&#x591A;&#x65B9;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x8BA9;&#x6211;&#x4EEC;&#x7075;&#x6D3B;&#x7684;&#x4F7F;&#x7528;&#x6B63;&#x5219;&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x73B0;&#x5728;&#x54B1;&#x4EEC;&#x7684;&#x4EFB;&#x52A1;&#x5C31;&#x662F;&#x5B66;&#x4E60;&#x8FD9;&#x4E9B;&#x65B9;&#x6CD5;&#x7684;&#x4F7F;&#x7528;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="正则表达式.html" class="navigation navigation-prev " aria-label="Previous page: 第一章：正则表达式">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Python中的正则表达式.html" class="navigation navigation-next " aria-label="Next page: 1.2 Python中的正则表达式">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"1.1 正则表达式入门","level":"1.2.1","depth":2,"next":{"title":"1.2 Python中的正则表达式","level":"1.2.2","depth":2,"path":"notes/Python中的正则表达式.md","ref":"notes/Python中的正则表达式.md","articles":[]},"previous":{"title":"第一章：正则表达式","level":"1.2","depth":1,"path":"notes/正则表达式.md","ref":"notes/正则表达式.md","articles":[{"title":"1.1 正则表达式入门","level":"1.2.1","depth":2,"path":"notes/正则表达式入门.md","ref":"notes/正则表达式入门.md","articles":[]},{"title":"1.2 Python中的正则表达式","level":"1.2.2","depth":2,"path":"notes/Python中的正则表达式.md","ref":"notes/Python中的正则表达式.md","articles":[]},{"title":"1.3 基本正则表达式","level":"1.2.3","depth":2,"path":"notes/基本正则表达式.md","ref":"notes/基本正则表达式.md","articles":[]},{"title":"1.4 分组","level":"1.2.4","depth":2,"path":"notes/分组.md","ref":"notes/分组.md","articles":[]},{"title":"1.5 先行断言","level":"1.2.5","depth":2,"path":"notes/先行断言.md","ref":"notes/先行断言.md","articles":[]},{"title":"1.6 标记","level":"1.2.6","depth":2,"path":"notes/标记.md","ref":"notes/标记.md","articles":[]},{"title":"1.7 替换与正则编译","level":"1.2.7","depth":2,"path":"notes/替换与正则表达式编译.md","ref":"notes/替换与正则表达式编译.md","articles":[]},{"title":"1.8 正则表达式练习","level":"1.2.8","depth":2,"path":"notes/正则表达式练习.md","ref":"notes/正则表达式练习.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"notes/正则表达式入门.md","mtime":"2019-05-04T08:39:48.019Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-08T02:50:45.307Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

